<?php
/**
 *      [Haidao] (C)2013-2099 Dmibox Science and technology co., LTD.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      http://www.haidao.la
 *      tel:400-600-2042
 */
class consult_control extends cp_control {
    public function _initialize() {
        parent::_initialize();
		$this->user_consult = model('goods/goods_consult','service');
    }

    public function index() {
	   $_GET['page'] = (int)$_GET['page'];
	   $_GET['id'] = (int)$this->member['id'];
	   if($_GET['id'] < 1){
		   showmessage('参数错误');
	   }
	   $userinfo = $this->user_consult->user_consult($_GET['id'],$_GET['page']);
	   $count = model('goods_consult')->where(array('mid' => array('eq',$_GET['id'])))->count();
	   $pages = pages($count,10);
	   $SEO = seo('我的咨询 - 会员中心');
       include template('consult');
    }
}
